package com.fanxuankai.ksql.function.udf.math;

import cn.hutool.core.util.IdUtil;
import io.confluent.ksql.function.udf.Udf;
import io.confluent.ksql.function.udf.UdfDescription;

/**
 * @author fanxuankai
 */
@UdfDescription(name = "id", description = "ID 生成", author = "fanxuankai")
public class Id {
    @Udf(description = "long ID.")
    public Long longId() {
        return IdUtil.getSnowflakeNextId();
    }
}
